#!/bin/sh
#####gmac test#####
ifconfig eth0 192.168.2.120
route add default gw 192.168.2.1
sleep 3
mount -t nfs -o nolock 192.168.2.128:/home/oywei/nfsroot/a1/test /mnt

sleep 1
i=`grep -c "" /mnt/reboot.txt`
echo reboot num $i
echo reboot$i >> /mnt/reboot.txt

cat /dev/mtd1 > /mnt/kernel

#####sfc test#####
flash_eraseall /dev/mtd1
sleep 1
flashcp /mnt/kernel /dev/mtd1
umount /mnt/
sleep 5
#####reboot test#####
reboot
